package com.study.ssm.factory.bean;

import lombok.Getter;
import lombok.Setter;

/**
 * @author zhoujunlin
 * @date 2023年07月23日 19:32
 * @desc
 */
public class UserServiceImpl implements UserService {

    @Getter
    @Setter
    private UserDAO userDAO;

    @Override
    public int register(User user) {
        return userDAO.add(user);
    }

    @Override
    public User query(String username, String password) {
        return userDAO.queryByUserNameAndPassword(username, password);
    }
}
